package yo.latyoo.hokage.skmr.biz.domain;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Index;
import jakarta.persistence.Table;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Entity
@Table(indexes = {
		@Index(columnList = "jobId")
})
public class JobLog implements Serializable {

	@Id
	private Long id;
	// job info
	private Long jobGroup;
	private Long jobId;

	// execute info
	private String targetAddress;
	private String targetHandlerMethod;
	private String targetParam;

	// trigger info
	private LocalDateTime triggerTime;
	private int triggerCode;
	private String triggerMsg;
	
	// handle info
	private LocalDateTime resultTime;
	private int resultCode;
	private String resultMsg;
	private LocalDate createdAt;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public LocalDate getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(LocalDate createdAt) {
		this.createdAt = createdAt;
	}

	public Long getJobGroup() {
		return jobGroup;
	}

	public void setJobGroup(Long jobGroup) {
		this.jobGroup = jobGroup;
	}

	public Long getJobId() {
		return jobId;
	}

	public void setJobId(Long jobId) {
		this.jobId = jobId;
	}

	public String getTargetHandlerMethod() {
		return targetHandlerMethod;
	}

	public void setTargetHandlerMethod(String targetHandlerMethod) {
		this.targetHandlerMethod = targetHandlerMethod;
	}

	public String getTargetAddress() {
		return targetAddress;
	}

	public void setTargetAddress(String targetAddress) {
		this.targetAddress = targetAddress;
	}


	public String getTargetParam() {
		return targetParam;
	}

	public void setTargetParam(String targetParam) {
		this.targetParam = targetParam;
	}

	public LocalDateTime getTriggerTime() {
		return triggerTime;
	}

	public void setTriggerTime(LocalDateTime triggerTime) {
		this.triggerTime = triggerTime;
	}

	public int getTriggerCode() {
		return triggerCode;
	}

	public void setTriggerCode(int triggerCode) {
		this.triggerCode = triggerCode;
	}

	public String getTriggerMsg() {
		return triggerMsg;
	}

	public void setTriggerMsg(String triggerMsg) {
		this.triggerMsg = triggerMsg;
	}

	public LocalDateTime getResultTime() {
		return resultTime;
	}

	public void setResultTime(LocalDateTime resultTime) {
		this.resultTime = resultTime;
	}

	public int getResultCode() {
		return resultCode;
	}

	public void setResultCode(int resultCode) {
		this.resultCode = resultCode;
	}

	public String getResultMsg() {
		return resultMsg;
	}

	public void setResultMsg(String resultMsg) {
		this.resultMsg = resultMsg;
	}
}
